31. Parameters and Consistency

Parameters And Consistency

Process Noise and the UKF Project

For the CTRV model, two parameters define the process noise:

  • \large \sigma^2_a representing longitudinal acceleration noise (you might see this referred to as linear acceleration)
  • \large \sigma^2_{\ddot\psi} representing yaw acceleration noise (this is also called angular acceleration)

In the project, both of these values will need to be tuned. You will have to test different values in order to get a working solution. In the video, Dominik mentions using \large \sigma^2_a = 9 \frac{m^2}{s^4} as a starting point when tracking a vehicle. In the UKF project, you will be tracking a bicycle rather than a vehicle. So 9 might not be an appropriate acceleration noise parameter. Tuning will involve:

  • guessing appropriate parameter values
  • running the UKF filter
  • deciding if the results are good enough
  • tweaking the parameters and repeating the process

Linear Acceleration Noise Parameter Intuition

Let's get some intuition for these noise parameters. The units for the acceleration noise parameter \large \sigma^2_a are \Large\frac{m^2}{s^4} . Taking the square root, we get \large \sigma_a with units \large \frac{m}{s^2} . So the square root of the acceleration noise parameter has the same units as acceleration: \large \frac{m}{s^2}

The parameter \large \sigma_a is the standard deviation of linear acceleration! Remember from the "CTRV Process Noise Vector" lecture that the linear acceleration is being modeled as a Gaussian distribution with mean zero and standard deviation \large \sigma_a . In a Gaussian distribution, about 95% of your values are within 2 \large \sigma_a .

So if you choose \large \sigma^2_a = 9 \frac{m^2}{s^4} , then you expect the acceleration to be between \large -6 \frac{m}{s^2} and \large +6 \frac{m}{s^2} about 95% of the time.

Tuning parameters involves some trial and error. Using your intuition can help you find reasonable initial values.

Yaw Acceleration Noise Parameter Intuition

If yaw acceleration has units of radians/s^2 , what are the units of the yaw acceleration noise parameter \large \sigma^2_{\ddot\psi} ?

(A) rad/s^2

(B) rad^2/s^2

(C) rad/s^4

(D) rad^2/s^4

Yaw Acceleration Noise Parameter Units

What are the units for the yaw acceleration noise parameter?

SOLUTION: D

Let's think about what values might be reasonable for the yaw acceleration noise parameter.

Imagine the bicycle is traveling in a circle with a constant yaw rate (angular velocity) of \Large \frac{\pi}{8} \frac{rad}{s} . That means the bicycle would complete a full circle in 16 seconds: \Large\frac{\pi}{8} \frac{rad}{s} \cdot 16 s = 2\pi .

That seems reasonable for an average bike rider traveling in a circle with a radius of maybe 16 meters.

The bike rider would have also have a tangential velocity of 6.28 meters per second because \Large\frac{\pi}{8} \frac{rad}{s} \cdot 16 \text{ meters} = 6.28 \text{ meters per second} .

What if the angular acceleration were now \large -2\pi \frac{rad}{s^2} instead of zero? In just one second, the angular velocity would go from \Large \frac{\pi}{8} \frac{rad}{s} to \Large -\frac{15\pi}{8} \frac{rad}{s} . This comes from \Large \frac{\pi}{8} \frac{rad}{s} - 2\pi \Large \frac{rad}{s^2} \cdot 1 s = - \Large \frac{15\pi}{8} \frac{rad}{s} .

The bicycle has been completing a complete circle in 16 seconds. But with such a high angular acceleration, then all of a sudden the bicycle is going around the circle in the opposite direction and only takes about 1.1 second to complete the circle.

From a bicycle, a setting in the range of \large \sigma_{\ddot\psi} = 2\pi \frac{rad}{s^2} seems too high. In the project, you'll have to experiment with different values to see what works well.

Measurement Noise Parameters

Measurement noise parameters represent uncertainty in sensor measurements. In general, the manufacturer will provide these values in the sensor manual. In the UKF project, you will not need to tune these parameters.